package com.itheima.mall.controller.smsController;


import com.itheima.mall.commons.R;
import com.itheima.mall.service.smsService.SmsCouponHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("couponHistory")
public class SmsCouponHistoryController {
    @Autowired
    private SmsCouponHistoryService  smsCouponHistoryService;
    //根据优惠券id，使用状态，订单编号分页获取领取记录
    @GetMapping("list")
    private R columnsList(@RequestParam(required = false )Integer couponld,
                          @RequestParam(required = false )String orderSn,
                          @RequestParam(required = false) Integer pageNum,
                          @RequestParam(required = false)Integer pageSize,
                          @RequestParam(required = false)Integer useStatus){
      return smsCouponHistoryService.getList(couponld,orderSn,pageNum,pageSize,useStatus);
    }
}
